<?php
$id=trim($_REQUEST['id']);
$list_row = pdo_fetchall("SELECT * FROM ".tablename('shopping3_chef')." where status=1 and id=".$id."");
$cuisinelist=array(
            '0'=>array('name'=>'请选择','img'=>''),
            '1'=>array('name'=>'鲁菜','img'=>''),
            '2'=>array('name'=>'粤菜','img'=>'images/yue.png'),
            '3'=>array('name'=>'川菜','img'=>'images/chuan.png'),
            '4'=>array('name'=>'湘菜','img'=>''),
            '5'=>array('name'=>'闽菜','img'=>''),
            '6'=>array('name'=>'浙菜','img'=>''),
            '7'=>array('name'=>'苏菜','img'=>''),
            '8'=>array('name'=>'徽菜','img'=>'images/hui.png'),
);
foreach($list_row as $key=>$val){
    if(array_key_exists($val['cuisine'],$cuisinelist)){
        $list_row[$key]['cuisine_img']=$cuisinelist[$val['cuisine']]['img'];
        $list_row[$key]['cuisine_name']=$cuisinelist[$val['cuisine']]['name'];
    }
}
$dayof=date("Y-m-d");
$genius_list = pdo_fetchall("SELECT id,thumb,title,marketprice,goodsid,totalprice FROM ".tablename('shopping3_genius')." where status=1 and shop_id=".$id." order by displayorder");

$datrow=pdo_fetchall("select * from ".tablename('shopping3_schedule')." where  sdate>='".$dayof."' and chefid=".$id);
 
$goods_list = pdo_fetchall("SELECT * FROM ".tablename('shopping3_goods')." where status=1 and shop_id=".$id." order by pcate");

$classselect=pdo_fetchall("select * from ".tablename('shopping3_category')." where 1 order by displayorder ");

$cart = pdo_fetch("SELECT * FROM ".tablename('shopping3_cart')." WHERE  weid = '{$weid}' AND from_user = '{$_W['fans']['from_user']}'");
if(!empty($cart["goodsinfo"])){
    $goodsinfo=unserialize($cart["goodsinfo"]);
    $MyDate=$cart["sdate"];
    $pakageid=$cart["pakageid"];
}else{
    $goodsinfo=array();
    $MyDate="";
    $pakageid="";
}
 


$row=$list_row[0];
include $this->template('wl_detailnew');


?>